package com.hippo.core.ui.components

import androidx.compose.foundation.isSystemInDarkTheme
import androidx.compose.material3.MaterialTheme
import androidx.compose.runtime.Composable
import androidx.compose.runtime.DisposableEffect
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import com.google.accompanist.systemuicontroller.rememberSystemUiController
import com.hippo.core.ui.navigation.AppNavHost

@Composable
fun SystemBarWrapper(block: @Composable ()->Unit) {


    val systemUiController = rememberSystemUiController()

    DisposableEffect(systemUiController, true) {

        systemUiController.setSystemBarsColor(
            color = Color.White,
            darkIcons = true
        )

        systemUiController.setNavigationBarColor(
            color = Color.White,
            darkIcons = true
        )
        onDispose {
        }
    }

    block()
}